/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!		\file		prpex_header.h
  \date		june 2011
  \author		TNick

  \brief		Header class


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read ReadMe.txt and Licence.txt in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __PRPEX_HEADER_INC__
#define __PRPEX_HEADER_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	<QString>
#include	"prpmdl.h"
#include	"prptpl.h"

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

/// class representing a header
/**
*	headers are diffrent from all other types; they are hosting subitems
*	and are the only type allowed at top level
*/
class PEX_Hd : public PrpNode		{

	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:

	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

public:

	/// constructor;
	PEX_Hd		(
			PrpMdl*		pa_mdl,		/**< father model */
			PrpNode*	pa_fth,		/**< father item; NULL for top level */
			QString		stra_name,	/**< name of entry */
			QString		stra_descr	/**< description of entry */
			) : PrpNode(pa_mdl,pa_fth,PrpTpl::HEADER,stra_name,stra_descr)
		{ };


	/// destructor;
	virtual				~PEX_Hd		(void) {}

	/// request actual value in text form
	virtual QVariant		valAsText	(void)
		{	return QVariant(); }
	/// request decoration for the value
	virtual	QVariant		valAsDecor	(void)
		{	return QVariant(); }
	/// request to change the value made by user
	virtual bool			changeVal	(QVariant new_value)
		{	Q_UNUSED(new_value); return false; }

	/// create editor for this type of item
	virtual	QWidget*	editCreate	(
			QWidget *					parent,
			const QStyleOptionViewItem	&option
			)
		{
			Q_UNUSED(parent);
			Q_UNUSED(option);
			return NULL;
		}
	/// load data from item to editor
	virtual	void		editLoad	(
			QWidget *					editor
			) {Q_UNUSED(editor);}
	/// save data from editor to item
	virtual	void		editSave	(
			QWidget *					editor
			) {Q_UNUSED(editor);}
	//	/// update geometry for the editor
	//	virtual	void		editResize	(
	//		QWidget *					editor,
	//		const QStyleOptionViewItem	&option
	//		) {}




	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class PEX_Hd	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __PRPEX_HEADER_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
